package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpShopActivityUserDTO;
import com.financing.wap.dao.IFpShopActivityUserDao;
import com.financing.wap.common.SqlName;
/**
 * fp_shop_activity_user  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpShopActivityUserDao")
public class FpShopActivityUserDaoImpl extends BaseDaoImpl<FpShopActivityUserDTO, java.lang.Integer> implements IFpShopActivityUserDao {


	@Override
	public int insert(FpShopActivityUserDTO fpShopActivityUser) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpShopActivityUserSql.insert, fpShopActivityUser);
	}

	@Override
	public void update(FpShopActivityUserDTO fpShopActivityUser) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopActivityUserSql.update, fpShopActivityUser);
	}

	@Override
	public void updateForce(FpShopActivityUserDTO fpShopActivityUser) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopActivityUserSql.updateForce, fpShopActivityUser);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpShopActivityUserSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpShopActivityUserDTO> queryList(FpShopActivityUserDTO fpShopActivityUser) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpShopActivityUserSql.queryList, fpShopActivityUser);
	}

	@Override
	public int queryListCount(FpShopActivityUserDTO fpShopActivityUser) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpShopActivityUserSql.queryListCount, fpShopActivityUser);
	}

	@Override
	public FpShopActivityUserDTO loadById(Integer id) throws SQLException {
		return  (FpShopActivityUserDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpShopActivityUserSql.loadById,id);
	}

	@Override
	public Class<FpShopActivityUserDTO> getEntityClass() {
		return FpShopActivityUserDTO.class;
	}
 	
}
